<?php  
//ini_set("display_errors",		1);
my_component_load('xl_builder' , false);
my_component_load('testing' , false);
my_component_load('paging' , false);
my_component_load('a_konfirmasi' );
$task =  isset($_GET['task']) ? $_GET['task']: '';
$periode_id=isset($_GET['periode_id']) ? (int) $_GET['periode_id'] : 0 ;
$modulname = " Waktu Kerja _BN_ Konfrimasi realisasi ";
if($task == "excel_hari_kerja"){
	header("Content-Type: application/xls");;
	header("Content-Disposition: attachment;filename=rpt_hari_kerja.xls");
	echo excel_hari_kerja($periode_id);
	exit;
}elseif($task == "sendmail"){ 
 
	$title = "Kirim absen seluruh karyawan";
	facebox_page('index.php?com='.$_GET['com'].'&nik_start='.$_GET['nik_start'].'&nik_end='.$_GET['nik_end'].'&task=sendmail_page&p='.rand(0,999999) , $title , 120	);  
}elseif($task == "sendmail_page"){  
	$content = page_kalkulasi(); 
	generate_my_web($content,"","plain.php");
	exit;
}elseif($task == "sendmail_proses"){  
	ini_set("max_execution_time","100000");
	header("Cache-Control: no-cache, must-revalidate");
	send_email();
	echo button_icon( 'check2.png' ,'')."<br/>Done !!";
	exit;
}elseif($task == "print"){ 
	include_once('components/'.$_GET['com'].'/cetak.'.$_GET['com'].'.php');
	exit; 
}else{
	$pagename = $modulname;
	load_facebox_script();
	$content = form_print();	
	//$content = '<input type="button" class="main_button" value="PRINT" 
	//onclick="javascript:location.href=\'index.php?com='.$_GET['com'].'&task=print\'" />';//list_karyawan_hari_kerja($periode_id);
}
generate_my_web($content, $pagename  );
?>